<?php $words = array(170, 125, 360, 200, 265, 280); // ch     ?>
<ul class="news">
	<?php for ($i = 0; $i < 6; $i++): ?>
		<li class="news-<?php echo $i; ?>">
			<?php if (isset($news[$i])): ?>
				<a href="/news/show/<?php echo $news[$i]->id; ?>">
					<img src="/assets/upload/img/<?php echo $news[$i]->home_cover_name; ?>" alt="news"/>
				</a>
				<a href="/news/show/<?php echo $news[$i]->id; ?>">
					<?php echo my_substr($news[$i]->title_zh, 26 ); ?>
				</a>
				<p><?php echo my_substr(plain_text($news[$i]->content_zh), $words[$i]); ?></p>
				<div class="date">
					<h4><?php echo date('M', strtotime($news[$i]->created_at)); ?></h4>
					<h3><?php echo date('d', strtotime($news[$i]->created_at)); ?></h3>
				</div>
			<?php endif; ?>
			<a title="点击设置该处显示新闻内容" href="javascript:void(0);" class="button button-<?php echo $i; ?>">击设置该处显示新闻内容</a>
		</li>
	<?php endfor; ?>
</ul>


<div class="select-box">
	<div class="background"></div>
	<table class="records">
		<thead><tr><th width="30">选择</th><th>标题</th><th width="200">发布时间</th></tr></thead>
		<tfoot>
			<tr>
				<td colspan="2"></td>
				<td>
					<ul class="button">
						<li><a href="javascript:void(0);" class="confirm">确定</a></li>
						<li><a href="javascript:void(0);" class="cancel">取消</a></li>
					</ul>
				</td>
			</tr>
		</tfoot>
		<tbody>
			<tr>
				<td colspan="3">Loading...</td>
			</tr>
		</tbody>
	</table>
</div>

<script type="text/x-jquery-tmpl" id="list-template">
	<tr>
		<td><input type="radio" name="id" value="${id}"</td>
		<td>${title_zh}</td>
		<td>${created_at}</td>
	</tr>
</script>
<script type="text/x-jquery-tmpl" id="none-template">
	<tr>
		<td colspan="3">暂时没有数据，请先添加新闻列表</td>
	</tr>
</script>